﻿Public Interface Theme

	ReadOnly Property ReadOnlyColor As Color
	ReadOnly Property FormColor As Color
	ReadOnly Property LabelColor As Color
	Sub Apply(Process As Object)
	ReadOnly Property Font As Font
	Sub PaintForm(g As Graphics, sender As Object)
	Sub PaintListHeader(g As Graphics, R As Rectangle)
	Sub PaintListColumnHeader(g As Graphics, R As Rectangle, Col As DataGridViewColumn, Filtered As Boolean)
	Sub PaintListRowHeader(g As Graphics, R As Rectangle, Row As DataGridViewRow)
	Sub Blur(ByVal G As Graphics, ByVal Control As Control, ByVal Rect As Rectangle)

End Interface

Public Class Themes

	Shared Objects As New List(Of Object)
	Public Shared Current As Theme = New StartupTheme

	Shared Sub Register(Obj As Object)
		Objects.Add(Obj)
		Current.Apply(Obj)
	End Sub

	Shared Sub SwitchTheme()
		Current = New DefaultTheme
		ApplyTheme()
	End Sub

	Shared Sub ApplyTheme()
		For Each Obj In Objects
			If Not Obj Is Nothing Then Current.Apply(Obj)
		Next
		FrmMain.Refresh()
	End Sub

	Shared Sub SetCurrent(Theme As Theme)
		Current = Theme
	End Sub

End Class

